Python syntax and semantics
part 14/45 · 74.8 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
In Python, everything is an object, even classes. Classes, as objects, have a class, which is known as their metaclass. Python also supports multiple inheritance and mixins.
The language supports extensive introspection of types and classes. Types can be read and compared—types are instances of type. The attributes of an object can be extracted as a dictionary.
Operators can be overloaded in Python by defining special member functions—for instance, defining a method named __add__ on a class permits one to use the + operator on objects of that class.
Literals
Strings
Normal string literals